<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>语言伪类选择器</title>
  <style>
    div:lang(en) {
      color: red;
    }
    div:lang(zh-CN) {
      color: green;
    }
  </style>
</head>
<body>
  <div>尚硅谷1</div>
  <div lang="zh-CN">尚硅谷2</div>
  <p>前端</p>
  <span>你好</span>
</body>
</html>